package com.cloudfun.campusshare.common.constant;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2020/4/17 9:35
 * @description :
 */
public enum  ServiceType {
    CLOTHES_WASHING(1,"洗衣服务"),
    CLOTHES_DRY(2,"干衣服务"),
    SHOES_WASHING(3,"洗鞋服务");

    private int code;
    private String message;

    ServiceType(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static ServiceType getTypeByCode(int code){
        ServiceType[] values = ServiceType.values();
        for(ServiceType serviceType:values){
            if(serviceType.code == code){
                return serviceType;
            }
        }
        return null;
    }
}
